]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: show hover and tooltip while the menu is up
authorOwen W. Taylor <otaylor@fishsoup.net>
Tue, 22 Mar 2011 14:43:27 +0000 (10:43 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Tue, 22 Mar 2011 16:38:25 +0000 (12:38 -0400)
While we have menu for an app icon open, we want to show the prelight
for the item instead of removing the prelight when the user mouses
away from the item and into the menu, and if there's a tooltip
(like for the dash), we want to show the tooltip immediately when
the menu is popped up.

https://bugzilla.gnome.org/show_bug.cgi?id=642871

js/ui/appDisplay.js

index bfe5ff70ad6effb30a663589c0ffd8393d0af02e..2623a46078efa47c06bc0f007a609a58e6441c84 100644 (file)
@@ -513,6 +513,8 @@ AppWellIcon.prototype = {
             this._menuManager.addMenu(this._menu);
         }
 
+        this.actor.set_hover(true);
+        this.actor.show_tooltip();
         this._menu.popup();
 
         return false;
@@ -576,6 +578,9 @@ AppIconMenu.prototype = {
 
         PopupMenu.PopupMenu.prototype._init.call(this, source.actor, 0.5, side, 0);
 
+        // We want to keep the item hovered while the menu is up
+        this.blockSourceEvents = true;
+
         this._source = source;
 
         this.connect('activate', Lang.bind(this, this._onActivate));